package com.zxc.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
  * @author: zxc
  * @return:
  * @time:  2021/5/20 19:06
  * @description:
  */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Emp implements Serializable {
    private Integer eno;
    private String ename;
    private String esex;
    private Double salary;
    private String pwd;
    private Integer dno;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date bornDate;

    private Dept dept;


    public Emp(String ename, String esex, Double salary, String pwd, Integer dno, Date bornDate) {
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
    }
}
